package com.app.micaihu.utils;

import com.app.micaihu.app.AppApplication;
import com.app.utils.util.StringUtils;
import com.umeng.analytics.MobclickAgent;

import java.util.HashMap;

/**
 *
 */
public class MobclickAgentUtils {

    /**
     * 埋点
     */
    public static void event(String eventId, String label) {
        if (StringUtils.isEmpty(label)) {
            event(eventId);
        } else {
            MobclickAgent.onEvent(AppApplication.getInstance().getApplicationContext(), eventId, label);
        }
    }

    /**
     * 埋点
     */
    public static void event(String eventId) {
        MobclickAgent.onEvent(AppApplication.getInstance().getApplicationContext(), eventId);
    }

    /**
     * 埋点
     */
    public static void event(String eventId, HashMap<String, Object> map) {
        MobclickAgent.onEventObject(AppApplication.getInstance().getApplicationContext(), eventId, map);

    }
}